<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>新疆汽配网后台</title>
	<link rel="stylesheet" href="/Public/layui/css/layui.css">
	<style type="text/css">
		#main{
			position:fixed;top:60px;left:200px;padding:10px; width:calc( 100% - 200px );

			height:calc( 100% - 63px );
		}
		.layui-tab-item{
			height:100%;
		}
		.layui-tab-item iframe{
			width:100%; border:none; height:100%;
		}

		.layui-tab-content{
			height:calc( 100% - 60px );
		}
		.layui-tab{
			height:calc( 100% - 10px );
		}
		.layui-nav-tree::-webkit-scrollbar {
			display:none;
		}
	</style>
</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo">新疆车管家后台</div>
			<!-- 头部区域（可配合layui已有的水平导航） -->
			<ul class="layui-nav layui-layout-left">
				<li class="layui-nav-item"><a href="javascript:close_layout()" id="oc">关闭菜单</a></li>
				<li class="layui-nav-item"><a href="javascript:quanping()" id="qp">开启全屏</a></li>
			</ul>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item">
					<a href="javascript:;">
						<img src="<?php echo ($admin["head_ico"]); ?>" class="layui-nav-img">
						<?php echo ($admin["name"]); ?>
					</a>
					<dl class="layui-nav-child">
						<dd><a href="">基本资料</a></dd>
						<dd><a href="">安全设置</a></dd>
					</dl>
				</li>
				<li class="layui-nav-item"><a href="/Login/login_out">退出登录</a></li>
			</ul>
		</div>

		<div class="layui-side layui-bg-black" style="background: #282b33;" id="left">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree"  lay-filter="test">
					<li class="layui-nav-item layui-nav-itemed">
						<a class="" href="javascript:;">系统</a>
						<dl class="layui-nav-child">
							<dd class="layui-this"><a url="/Admin/Index/counts">数据统计</a></dd>
						</dl>
					</li>

					<li class="layui-nav-item layui-nav-itemed">
						<a class="" href="javascript:;">分类</a>
						<dl class="layui-nav-child">
							<dd><a url="/Admin/CarType/index.html">车辆品牌管理</a></dd>
							<dd><a url="/Admin/Insurancelist/index.html">保险种类管理</a></dd>
						</dl>
					</li>

					

					<li class="layui-nav-item layui-nav-itemed">
						<a class="" href="javascript:;">商品</a>
						<dl class="layui-nav-child">
							<dd><a url="/Admin/GoodsCarType/index.html">汽车管理</a></dd>
							<dd><a url="/Admin/Hotcar/index.html">热门车型</a></dd>
							<dd><a url="/Admin/GoodsParts/index.html">配件管理</a></dd>
							<dd><a url="/Admin/GoodsInsurance/index.html">保险管理</a></dd>
						</dl>
					</li>


					<li class="layui-nav-item layui-nav-itemed">
						<a class="" href="javascript:;">产品</a>
						<dl class="layui-nav-child">
							<dd><a url="/Admin/ProductCar/index?id=1">首页汽车</a></dd>
							<dd><a url="/Admin/ProductCar/index?id=2">首页配件</a></dd>
							<dd><a url="/Admin/ProductCar/index?id=3">首页保险</a></dd>
						</dl>
					</li>

					<li class="layui-nav-item layui-nav-itemed">
						<a class="" href="javascript:;">用户</a>
						<dl class="layui-nav-child">
							<dd><a url="/Admin/User/index.html">用户管理</a></dd>
							<dd><a url="/Admin/Customer/index.html">顾客管理</a></dd>
						</dl>
					</li>

					<li class="layui-nav-item layui-nav-itemed">
						<a class="" href="javascript:;">管理员</a>
						<dl class="layui-nav-child">
							<dd><a url="/Admin/Admin/index.html">管理员管理</a></dd>
						</dl>
					</li>
				</ul>
							
			</div>
		</div>

		<div id="main">
			<div class="layui-tab" lay-filter="content" lay-allowclose="true">
				<ul class="layui-tab-title">
					<li class="layui-this" lay-id="AdminIndexcountshtml">数据统计</li>
				</ul>
				<div class="layui-tab-content">
					<div class="layui-tab-item layui-show">
						<iframe id="Indexcountshtml" src="/Admin/Index/counts.html"></iframe>
					</div>
				</div>
			</div>
		</div>

		
	</div>

	<script src="/Public/layui/layui.all.js"></script>
	<script type="text/javascript">

		var close = 0;
		var qp = 0;
		function quanping(){
			if (qp == 0) {
				lfs(document.documentElement);
				qp = 1;
				$("#qp").html("关闭全屏");
			}else{
				efs();
				qp = 0;
				$("#qp").html("开启全屏");
			}
	   	}

		function close_layout(){
			if (close == 0) {
				$('#left').hide();
				$('#main').css("width","100%");
				$('#main').css("left","0px");
				close = 1;
				$('#oc').html("打开菜单");
			}else{
				$('#left').show();
				$("#main").css("width","calc( 100% - 200px )");
				$('#main').css("left","200px");
				close = 0;
				$('#oc').html("关闭菜单");
			}
		}

		$('dd a').click(function(){
			var url = $(this).attr('url');
			var id = url.replace(/\//g, "");
			id = id.replace(/\./g, "");
			id = id.replace(/\?/g, "");
			id = id.replace(/\=/g, "");

			if ( $('#'+id).attr('id') == undefined) {
				element.tabAdd('content', {
					title: $(this).html(),
					content: '<iframe id="'+id+'" src="'+url+'"></iframe>',
					id: id
				});
			}else{
				document.getElementById(id).contentWindow.location.href=url;
			}
			element.tabChange('content', id);
			
		});
		

		function lfs(element) {
			if(element.requestFullscreen) {
				element.requestFullscreen();
			} else if(element.mozRequestFullScreen) {
				element.mozRequestFullScreen();
			} else if(element.webkitRequestFullscreen) {
				element.webkitRequestFullscreen();
			} else if(element.msRequestFullscreen) {
				element.msRequestFullscreen();
			}
			var height = $(window).height() - 60 - 45;
			$('.frame_list').height(height);
		}
		function efs() {
			if(document.exitFullscreen) {
				document.exitFullscreen();
			} else if(document.mozCancelFullScreen) {
				document.mozCancelFullScreen();
			} else if(document.webkitExitFullscreen) {
				document.webkitExitFullscreen();
			}

		}
	</script>
</body>
</html>